//
//  COServiceCollectionViewCell.swift
//  CocoProject
//
//  Created by Vill on 2023/11/13.
//

import UIKit

class COServiceCollectionViewCell: UICollectionViewCell {
    var btnStr:String = ""{
        didSet{
            self.tagBtn.setTitle(btnStr, for: .normal)
            self.tagBtn.backgroundColor = UIColor.colorWithHex("#F5F5F5")
        }
    }
    
    lazy var tagBtn: UIButton = {
        let tag = UIButton(type: .custom)
        tag.setTitleColor(UIColor.colorWithHex("#7863A6"), for: .normal)
        tag.titleLabel?.font = UIFont.pingfangFont(ofSize: PTW(12), weight: .regular)
        tag.isUserInteractionEnabled = false
        tag.layer.cornerRadius = PTW(15)
        tag.layer.masksToBounds = true
        return tag
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUpUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUpUI(){
        self.contentView.addSubview(self.tagBtn)
        self.tagBtn.snp.makeConstraints { make in
            make.edges.equalTo(self.contentView)
        }
    }
}
